package org.dahuatech.ssh.entity.organization;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.dahuatech.ssh.entity.IdEntity;
import org.springframework.transaction.annotation.Transactional;

@Table(name="sys_organization")
@Entity
public class Organization extends IdEntity {
	/**
	 * 编码
	 */
	private String code;
	/**
	 * 部门名称
	 */
	private String name;
	/**
	 * 排序
	 */
	private Long order;
	/**
	 * 父菜单id
	 */
	private Long pId;
	
	/**
	 * 部门联系人
	 */
	private String linkMan;
	
	/**
	 * 部门联系方式
	 */
	private String linkPhone;
	
	/**
	 * 图片路径
	 */
	private String icon;
	
	/**
	 * 是否打开
	 */
	private boolean open;
	
	@Column
	public String getCode() {
		return code;
	}
	
	@Column(name="org_name")
	public String getName() {
		return name;
	}
	
	@Column(name="org_sort")
	public Long getOrder() {
		return order;
	}
	

    @Column(name="pid")
    public Long getpId() {
        return pId;
    }
	
	public void setCode(String code) {
		this.code = code;
	}
	public void setName(String name) {
		this.name = name;
	}
	public void setOrder(Long order) {
		this.order = order;
	}

    public void setpId(Long pId) {
        this.pId = pId;
    }

    public void setLinkMan(String linkMan) {
        this.linkMan = linkMan;
    }

    @Column
    public String getLinkMan() {
        return linkMan;
    }

    public void setLinkPhone(String linkPhone) {
        this.linkPhone = linkPhone;
    }

    @Column
    public String getLinkPhone() {
        return linkPhone;
    }

	public void setIcon(String icon) {
		this.icon = icon;
	}

	@Transient
	public String getIcon() {
		return icon;
	}

	public void setOpen(boolean open) {
		this.open = open;
	}

	@Transient
	public boolean isOpen() {
		return open;
	}

}
